/*
  ID: nemokin1
  PROG: subset
  LANG: C++
*/

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
 
using namespace std;
 
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=b;--i)
#define FOREACH(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define ALL(c) (c).begin(),(c).end()
 
#define debug(x) cerr<< #x << " = " << (x) << "\n";
#define debugv(v) cerr << #v << " = "; FOREACH(it,v) cerr << *it <<","; cerr << "\n";
#define SIZE(a)  (int(a.size()))
 
template<typename T> inline void checkMax(T& a, T b) {if (b>a) a=b;}
template<typename T> inline void checkMin(T& a, T b) {if (b<a) a=b;}
 
typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef long double ld;
const int INF = 1000000000;

/*dfs version, seems works slow
int cnt = 0;
int N;
void dfs(int p, int sum)
{
    sum+=p;
    if(sum > (1+N)*N/4) return;
    if(sum == (1+N)*N/4){cnt++; return;}
    for(int i = p+1; i <= N; i++){
	dfs(i,sum);
    }
}

int main() {
    freopen("subset.in","r",stdin);freopen("subset.out","w",stdout);
    cin >> N;
    if(((1+N)*N)%4) {cout<<"0"<<endl;exit(0);}
    for(int i = 1; i <=N; i++){
	dfs(i,0);
    }
    cout << cnt/2 << endl;
    exit(0);
}
*/
int main() {
    freopen("subset.in","r",stdin);freopen("subset.out","w",stdout);
    int N;
    long long dp[40][3000];
    cin >> N;
    if(((1+N)*N)%4) {cout<<"0"<<endl;exit(0);}
    for(int i = 0; i <= N; i++){
	dp[i][0] = 1;
    }
    for(int i = 1; i <= N*(N+1)/4; i++){
	dp[0][i] = 0;
    }
    for(int number = 1; number <= N; number++){
	for(int weight = 1; weight <= (1+N)*N/4; weight++){
	    if(weight < number) dp[number][weight] = dp[number-1][weight];
	    else dp[number][weight] = dp[number-1][weight]+dp[number-1][weight-number];
	}
    }
    cout << dp[N][(N+1)*N/4]/2 << endl;
    exit(0);
}
